package VN.EDU.IMIC.DEVELOPER.TRANTHITHANHNGA.OOP.capdoi;

public class CoupleModel {

	public boolean checkName(CoupleData Object) {
		if (Object.getName().equals("")) {
			return false;
		} else {
			return true;
		}
	}

	public boolean checkAge(CoupleData Object) {
		if (String.valueOf(Object.getAge()).equals("")) {
			return false;
		} else {
			return true;
		}
	}

	public boolean checkGender(CoupleData Object) {
		if (String.valueOf(Object.getStatus()).equals("")) {
			return false;
		} else {
			return true;
		}
	}

	public boolean checkStatus(CoupleData Object) {
		if (String.valueOf(Object.getStatus()).equals("")) {
			return false;
		} else {
			return true;
		}
	}

	public boolean checkResult(CoupleData Object) {
		 if (Object.getGender().equalsIgnoreCase("nu")
				&& (Object.getAge() >= 19) && (Object.getStatus() != 1)) {
			return true;
		} else if (Object.getGender().equalsIgnoreCase("nam")
				&& (Object.getAge() >= 22) && (Object.getStatus() != 1)) {
			return true;
		} else {
			return false;
		}

	}
}
